const Koa = require('koa');
const app = new Koa();
var Mock = require('mockjs');

app.use(async ctx => {
  ctx.body = Mock.mock({
    name: '@name',
    'age|1-100': 50,
    'val|0-2': 1
  });
});

app.listen(1000);
